1. Field of the Invention
The present invention relates to a communication apparatus, a communication method, and a storage medium. More particularly, the present invention relates to a communication apparatus having network interfaces and responding to device search.
2. Description of the Related Art
A device (e.g., image forming apparatus) connected to a network can be utilized from another device (e.g., a personal computer (PC)) on the network in a manner, for example, that print data is transmitted for printing from the PC to the image forming apparatus via the network.
Under such a network environment, a user is able to search for and use a desired device from other device on the network, as needed. Techniques to locate the desired device on the network are known, such as WSD (web services on device), SLP (service location protocol), and SNMP (simple network management protocol). For device search by these techniques, a broadcast or multicast search packet is generally transmitted from a device on a searching side to devices on a searched side and a response packet is sent back from each device on the searched side in reply to the search packet.
In recent years, it becomes possible to perform the above-described device search via a rooter. It is also possible to connect a device having a plurality of network interface cards (NICs) to the network and use the device via the network. For example, two wired and/or wireless NICs are mounted to an image forming apparatus and connected to the same network or different networks, whereby flexible and diversified usage of the image forming apparatus can be achieved.
With such a construction, however, a device on the searched side sometimes simultaneously receives the same search packet at its plural NICs. In that case, the NICs of the device on the searched side each send back a response packet to the searching device. Therefore, multiple results are obtained by the searching device, even if there is only one device on the searched side, posing a problem that the user is confused in determining which response packet should be used. This is because the above-described device search techniques are each based on an assumption that there is no device having plural NICs.
Accordingly, a method has been proposed that stores beforehand, in a device, information representing a NIC from which a packet should be transmitted, as with a conventional rooter (see, for example, Japanese Laid-open Patent Publication No. 2002-185496).
However, with the proposed method, the same NIC is always selected from among the plural NICs of the device on the searched side, as a NIC to be used for response packet transmission. As a result, there is a possibility that the selected NIC does not conform to the purpose of device search. For example, in a case where an image forming apparatus (as a device on the searching side) searches for a data transmission destination device with the purpose of transmitting huge data (such as a set of setting values in the image forming apparatus), it is efficient to send back a response from a NIC (among the NICs of the device on the searched side) which is closer in position on the network to the device on the searching side. Nevertheless, if the information representing the NIC to be used for response transmission is merely stored beforehand in each device on the searched side, there is a possibility that the device on the searched side transmits a response packet from another NIC which is remoter in position on the network from the device on the searching side. It should be noted that the position on the network can be determined based on, e.g., subnet mask in the case of IPv4 and based on, e.g., address prefix in the case of IPv6.